import service from './ajax';

//登录
export function login(params){
    return service({
        url:'user/login',
        method:'post',
        params
    })
}

// 注册
export function registe(params){
    return service({
        url:'/user/register',
        method:'post',
        params
    })
}

export function sms(params){
    return service({
        url:'/user/sms',
        method:'post',
        params
    })
}

export function smsValid(params){
    return service({
        url:'/user/smsValid',
        method:'post',
        params
    })
}
// 忘记密码
export function forgot(params){
    return service({
        url:'/user/passUpdate',
        method:'post',
        params
    })
}
// 忘记密码验证
export function forCode(params){
    return service({
        url:'/user/getPasswordCode',
        method:'post',
        params
    })
}


//首页接口
export function shouye(data){
    return service({
        url:'/getListB2bIndex',
        method:'post',
        data
    })
}

//groupId 接口
export function groupId(params){
    return service({
        url:"getListOfShopByGroupId",
        method:"post",
        params
    })
}

//分类
export function fenlei(params){
    return service({
         url:"/getSortInfoByStationIdV2/"+params,
         method:"post",
         params
     })
 }

 //品牌
 export function pinpai(params){
    return  service({
         url:"/getBrandInfo",
         method:"post",
         params
     })
 }

//  购物车接口
export function cart(params){
    return  service({
         url:"/getShoppingCart",
         method:"get",
         params
     })
 }

//选中
 export function pitch(params){
    return service({
         url:"/modifyCheckState",
         method:"post",
         params
     })
 }

//修改
 export function amend(data){
    return  service({
         url:"/modify",
         method:"post",
         data
     })
 }

//删除
export function del(data){
    return  service({
         url:"/delete",
         method:"post",
         params: data
     })
 }

 //收藏
 export function add(data){
    return  service({
         url:"/goodsColl/add",
         method:"post",
         data
     })
 }

 //购物车
 export function join(data){
    return  service({
         url:"/join",
         method:"post",
         data
     })
 }

//弹框提示
export function alert(data1,data2,data3,data4,data5,data6){
    return  service({
         url:"/goodsDetail/"+data1+"/"+data2+"/"+data3+"/"+data4+"/"+data5+"/"+data6+"/",
         method:"get",
        //  params: data
     })
 }

// 获取getListOfshopByGroupId接口
export function getListOfshopByGroupId(data){
    return service({
        url:"/getListOfShopByGroupId",
        method:'post',
        params:data
    })
}

//  我的接口
export function my(data){
    return  service({
         url:"/app/merchant/getByUserId/"+data,
         method:"post",
     })
 }





